package com.atguigu.gmall.wms.mapper;

import com.atguigu.gmall.wms.entity.WareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品库存
 * 
 * @author gangge
 * @email gangge@atguigu.com
 * @date 2022-09-04 10:24:20
 */
@Mapper
public interface WareSkuMapper extends BaseMapper<WareSkuEntity> {

    public List<WareSkuEntity> queryWareSkuEntities(@Param("skuId") String skuId,
                                                    @Param("count") Integer count);
    public Boolean lockStock(@Param("wareSkuId") String wareSkuId,
                             @Param("count") Integer count);
    public Boolean unlockStock(@Param("wareSkuId") String wareSkuId,
                             @Param("count") Integer count);
}
